﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>数据表查询</title>
    <link href="~/Scripts/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-easyui/jquery.min.js"></script>
    <script src="~/Scripts/jquery-easyui/jquery.easyui.min.js"></script>
    <script src="~/Scripts/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <link href="~/Content/themes/icon.css" rel="stylesheet" />
    <script src="~/Content/js/common.js"></script>
    <link href="~/Content/themes/table.css" rel="stylesheet" />
    <script type="text/javascript">

        var TabId = "@ViewBag.TabId";

        $(function () {

            $('#comSearchTabList').combobox({
                url: '/Table/GetAllTableDrop',
                valueField: 'Id',
                textField: 'TabViewName',
                panelHeight: 'auto',
                required: true
            });

            //动态构造列表
            var option = {};
            $.ajax({
                url: "/Table/GetTabColsJsonStr?TabId=" + TabId,
                type: "post",
                data: {},
                dataType: "json",
                success: function (data) {
                    option.columns = data.columns;
                    $("#ui_TabData_dg").datagrid({
                        url: "/Table/GetTabDataInfoByTabId?TabId=" + TabId,
                        striped: true, rownumbers: true, pagination: true, pageSize: 20, singleSelect: true, multiSort: true,
                        idField: 'Id',
                        sortName: 'UpdateTime',
                        sortOrder: 'desc',
                        pageList: [20, 40, 60, 80, 100]
                    });
                    $('#ui_TabData_dg').datagrid(option);
                }
            })
        });
    </script>

</head>
<body>
    <div id="ui_TabData_layout" class="easyui-layout" data-options="fit:true,border:false">
        @*<div data-options="region:'north',split:true,border:true,collapsed:true" title="条件搜索" style="height:72px;">
            <div id="ui_Fields_search">
                <table class="tableForm" style="height: 28px; background: #f5f5f5;">
                    <tr>
                        <th height="20px">
                            字段名：
                        </th>
                        <td>
                            <input name="txtSearchFieldName" id="txtSearchFieldName" class="easyui-validatebox textbox" style="width:150px;height:22px;" />
                        </td>
                        <td>
                            <a href="javascript:void(0);" class="easyui-linkbutton" iconcls="icon-search" plain="true"
                               onclick="searchdata();">搜索</a>
                        </td>
                    </tr>
                </table>
            </div>
        </div>*@
        <div data-options="region:'center',border:false">
            <table id="ui_TabData_dg" data-options="fit:true,border:false"></table>
        </div>
    </div>
</body>
</html>
